#include <stdio.h>
#include <math.h>

int main() {
	int n1, n2, n;
	int a, b, c, h, m, s;
	scanf("%d:%d:%d", &a, &b, &c);
	n1 = a * 3600 + b * 60 + c;
	scanf("%d:%d:%d", &a, &b, &c);
	n2 = a * 3600 + b * 60 + c;
	n = abs(n1 - n2);
	s = n % 60;
	m = n / 60 % 60;
	h = n / 3600 % 60;
	printf("%02d:%02d:%02d\n", h, m, s);
	return 0;
}